package a.f.l.a;

import a.a.l;
import a.c.ab;
import a.c.e;
import a.c.k;
import a.c.q;
import a.c.x;
import a.c.y;
import a.c.z;
import a.f.tb;
import a.i.db;

import java.util.*;

class rc
  implements Comparator
{
  private final z a;
  private final lc b;
  private final Map d;
  private final qb e;
  private int[] f;
  private int[] g;
  
  public rc(z paramz, lc paramlc, qb paramqb)
  {
    this.a = paramz;
    this.b = paramlc;
    this.e = paramqb;
    this.d = new HashMap();
    a();
  }
  
  public int compare(Object paramObject1, Object paramObject2)
  {
    boolean bool = sb.e;
    f localf1 = (f)paramObject1;
    f localf2 = (f)paramObject2;
    f localf3 = (bool) || (localf1.l() != null) ? localf1.l().c() : localf1;
    f localf4 = (bool) || (localf2.l() != null) ? localf2.l().c() : localf2;
    e_ locale_1 = new e_(localf3, localf4);
    if ((bool) || (this.d.containsKey(locale_1))) {
      return ((Integer)this.d.get(locale_1)).intValue();
    }
    e_ locale_2 = new e_(localf4, localf3);
    if (!bool) {
      if (this.d.containsKey(locale_2)) {
        return -((Integer)this.d.get(locale_2)).intValue();
      }
    }
    int i = tb.b == localf1.h() ? 1 : localf1.g() ? 0 : tb.a == localf1.h() ? 1 : 0;
    int j = tb.b == localf2.h() ? 1 : localf2.g() ? 0 : tb.a == localf2.h() ? 1 : 0;
    if (!bool) {}
    int k = i != 0 ? this.f[localf1.i().d()] : this.g[localf1.i().d()];
    if (!bool) {}
    int m = j != 0 ? this.f[localf2.i().d()] : this.g[localf2.i().d()];
    return k - m;
  }
  
  private void a()
  {
    boolean bool = sb.e;
    int i = sb.d;
    b_ localb_ = new b_(this.e.a());
    y localy = this.a.h();
    if (localy.e()) {}
    while (bool)
    {
      i locali = (i)localy.j();
      a(locali, localb_);
      localy.f();
      if ((!bool) && (i != 0)) {
        return;
      }
      if (i == 0) {
        break;
      }
    }
    a(localb_);
  }
  
  private void a(i parami, b_ paramb_)
  {
    boolean bool = sb.e;
    int i6 = sb.d;
    f[] arrayOff = new f[parami.e().size()];
    c_[] arrayOfc_ = new c_[arrayOff.length];
    g_[] arrayOfg_ = a(parami);
    Iterator localIterator = parami.e().iterator();
    int i = 0;
    if (localIterator.hasNext()) {}
    while (bool)
    {
      f localf1 = (f)localIterator.next();
      arrayOff[i] = localf1;
      arrayOfc_[i] = a(localf1);
      i++;
      if (i6 == 0) {
        break;
      }
    }
    z localz = new z();
    int j = 0;
    label404:
    label410:
    label504:
    label636:
    do
    {
      if (j >= arrayOff.length) {
        break;
      }
      f localf2 = arrayOff[j];
      c_ localc_1 = arrayOfc_[j];
      a.c.d locald1 = localf2.i();
      eb localeb1 = localf2.c();
      g_ localg_1 = arrayOfg_[j];
      if (i6 != 0) {
        break label1419;
      }
      int k = j + 1;
      do
      {
        do
        {
          if (k >= arrayOff.length) {
            break label1396;
          }
          int m = 0;
          f localf3 = arrayOff[k];
          if (i6 != 0) {
            break;
          }
          if (((!bool) && (localf2.l() == null)) || (localf2.l() != localf3.l()))
          {
            c_ localc_2 = arrayOfc_[k];
            a.c.d locald2 = localf3.i();
            eb localeb2 = localf3.c();
            g_ localg_2 = arrayOfg_[k];
            int n = 0;
            if (!bool) {
              if (localeb1.b() > localeb2.a())
              {
                if (bool) {
                  break label410;
                }
                if (localeb1.a() < localeb2.b()) {
                  break label404;
                }
              }
            }
            if (!bool) {}
            int i1 = localeb1.a() < localeb2.b() ? 1 : 0;
            if (!bool) {}
            int i2 = localeb2.a() < localeb1.b() ? 1 : 0;
            if (!bool) {
              if (i1 != 0)
              {
                m = -5;
                n = 1;
                if (bool) {
                  break label802;
                }
                if (i6 == 0) {
                  break label800;
                }
              }
            }
            Object localObject1;
            Object localObject2;
            Object localObject3;
            Object localObject4;
            int i4;
            if (!bool)
            {
              if (i2 != 0)
              {
                m = 5;
                n = 1;
                if (bool) {
                  break label802;
                }
                if (i6 == 0) {}
              }
              else
              {
                m = 0;
              }
            }
            else
            {
              if (bool) {
                break label802;
              }
              if (i6 != 0)
              {
                localObject1 = c(localf2);
                localObject2 = e(localf2);
                localObject3 = c(localf3);
                localObject4 = e(localf3);
                int i3 = 0;
                i4 = 0;
                if (!bool) {
                  if (c((eb)localObject1, localf3))
                  {
                    if (!bool) {
                      if (a((eb)localObject1, localf3))
                      {
                        i3 += localc_1.a();
                        if (bool) {
                          break label512;
                        }
                        if (i6 == 0) {
                          break label504;
                        }
                      }
                    }
                    i4 += localc_1.a();
                  }
                }
                if (!bool) {
                  if (c((eb)localObject2, localf3))
                  {
                    if (!bool) {
                      if (a((eb)localObject2, localf3))
                      {
                        i3 += localc_1.b();
                        if (bool) {
                          break label574;
                        }
                        if (i6 == 0) {
                          break label566;
                        }
                      }
                    }
                    i4 += localc_1.b();
                  }
                }
                if (!bool) {
                  if (c((eb)localObject3, localf2))
                  {
                    if (!bool) {
                      if (a((eb)localObject3, localf2))
                      {
                        i3 -= localc_2.a();
                        if (bool) {
                          break label636;
                        }
                        if (i6 == 0) {
                          break label628;
                        }
                      }
                    }
                    i4 -= localc_2.a();
                  }
                }
                if (!bool) {
                  if (c((eb)localObject4, localf2))
                  {
                    if (!bool) {
                      if (a((eb)localObject4, localf2))
                      {
                        i3 -= localc_2.b();
                        if (bool) {
                          break label692;
                        }
                        if (i6 == 0) {
                          break label690;
                        }
                      }
                    }
                    i4 -= localc_2.b();
                  }
                }
                if (!bool) {
                  if (i3 != 0)
                  {
                    m += i3;
                    n = 1;
                    if (bool) {
                      break label802;
                    }
                    if (i6 == 0) {
                      break label800;
                    }
                  }
                }
                if (!bool) {
                  if (i4 != 0)
                  {
                    m += i4;
                    if (bool) {
                      break label802;
                    }
                    if (i6 == 0) {
                      break label800;
                    }
                  }
                }
                int i5 = a(localeb1, localeb2);
                if (!bool) {
                  if (i5 != 0)
                  {
                    m += i5;
                    if (bool) {
                      break label802;
                    }
                    if (i6 == 0) {
                      break label800;
                    }
                  }
                }
                m += localf2.d() - localf3.d();
              }
            }
            if (bool) {
              continue;
            }
            if (m != 0)
            {
              if (!bool) {
                if (localg_1.f == 0)
                {
                  if (bool) {
                    break label885;
                  }
                  if (localg_2.f == 0)
                  {
                    if (!bool)
                    {
                      if (n != 0) {
                        a(localf2, localf3, m, localz);
                      }
                      paramb_.a(localf2, localf3, m);
                    }
                    if (bool) {
                      continue;
                    }
                    if (i6 == 0) {
                      break label1388;
                    }
                  }
                }
              }
              if (!bool) {
                if (localg_1.equals(localg_2))
                {
                  if (!bool) {
                    if (localg_1.f == 1)
                    {
                      a(localf2, localf3, m, localz);
                      if (bool) {
                        continue;
                      }
                      if (i6 == 0) {
                        break label1388;
                      }
                    }
                  }
                  if (!bool)
                  {
                    if (n != 0)
                    {
                      a(localf2, localf3, m, localz);
                      if (bool) {
                        continue;
                      }
                      if (i6 == 0) {
                        break label1388;
                      }
                    }
                    m = -m;
                    a(localf2, localf3, m, localz);
                  }
                  if (bool) {
                    continue;
                  }
                  if (i6 == 0) {
                    break label1388;
                  }
                }
              }
              if (!bool) {
                if (localg_1.f == 2)
                {
                  if (bool) {
                    break label1083;
                  }
                  if (localg_2.f == 2)
                  {
                    if (localg_1.h.h() == localg_2.h.h())
                    {
                      paramb_.a(localf2, localf3, m);
                      if (bool) {
                        continue;
                      }
                      if (i6 == 0) {
                        break label1388;
                      }
                    }
                    a(localf2, localf3, m, localz);
                    if (bool) {
                      continue;
                    }
                    if (i6 == 0) {
                      break label1388;
                    }
                  }
                }
              }
              if (!bool) {
                if (localg_1.f != 2)
                {
                  if (bool) {
                    break label1363;
                  }
                  if (localg_2.f != 2) {
                    break label1361;
                  }
                }
              }
              if (!bool)
              {
                if (localg_1.f != 1) {
                  if (bool) {
                    break label1353;
                  }
                }
              }
              else {
                if (localg_2.f != 1) {
                  break label1339;
                }
              }
              a(localf2, localf3, m, localz);
              localObject1 = this.b.a(locald1);
              localObject2 = ((n)localObject1).b(localg_1.h);
              localObject3 = this.b.a(locald2);
              localObject4 = ((n)localObject3).b(localg_2.h);
              if (!bool) {
                if (localg_1.f == 2)
                {
                  localtb = localg_1.h.h();
                  i4 = (bool) || ((localtb == tb.b) || (localtb == tb.c)) ? -Math.abs(m) : Math.abs(m);
                  paramb_.a((f)localObject2, (f)localObject4, i4);
                  if (bool) {
                    continue;
                  }
                  if (i6 == 0) {
                    break label1388;
                  }
                }
              }
              tb localtb = localg_2.h.h();
              i4 = (bool) || ((localtb == tb.b) || (localtb == tb.c)) ? -Math.abs(m) : Math.abs(m);
              paramb_.a((f)localObject4, (f)localObject2, i4);
              if (bool) {
                continue;
              }
              if (i6 != 0)
              {
                a(localf2, localf3, m, localz);
                if (bool) {
                  continue;
                }
                if (i6 != 0)
                {
                  if (n != 0) {
                    a(localf2, localf3, m, localz);
                  }
                  paramb_.a(localf2, localf3, m);
                }
              }
            }
          }
          k++;
        } while (i6 == 0);
        j++;
      } while (bool);
    } while (i6 == 0);
    label512:
    label566:
    label574:
    label628:
    label885:
    if ((!bool) && (localz.size() > 0)) {
      a(parami.e(), localz);
    }
    label690:
    label692:
    label1083:
    label1353:
    label1361:
    label1363:
    label1388:
    label1396:
    return;
  }
  
  private boolean a(eb parameb, f paramf)
  {
    if (!sb.e) {
      if (paramf.a() == null) {
        return false;
      }
    }
    eb localeb = new eb(paramf.a().a() - 1.0D, paramf.a().b() + 1.0D);
    return parameb.c(localeb);
  }
  
  private boolean c(eb parameb, f paramf)
  {
    if (!sb.e) {}
    return parameb.b(paramf.b()) <= 1.0D;
  }
  
  private void a(f paramf1, f paramf2, int paramInt, z paramz)
  {
    boolean bool = sb.e;
    f localf1 = (bool) || (paramf1.l() != null) ? paramf1.l().c() : paramf1;
    f localf2 = (bool) || (paramf2.l() != null) ? paramf2.l().c() : paramf2;
    if ((bool) || (localf1 != localf2))
    {
      this.d.put(new e_(localf1, localf2), new Integer(paramInt));
      paramz.add(paramInt < 0 ? new e_(localf1, localf2) : new e_(localf2, localf1));
    }
  }
  
  private void a(List paramList, z paramz)
  {
    boolean bool = sb.e;
    int k = sb.d;
    q localq = new q();
    a.c.n localn = localq.C();
    z localz1 = new z();
    z localz2 = new z();
    HashSet localHashSet = new HashSet(paramList.size());
    x localx = localq.B();
    HashMap localHashMap = new HashMap();
    Object localObject1 = paramz.iterator();
    if (((Iterator)localObject1).hasNext()) {}
    Object localObject7;
    while (bool)
    {
      localObject2 = (e_)((Iterator)localObject1).next();
      localObject3 = ((e_)localObject2).a;
      if (localHashSet.add(localObject3))
      {
        localObject4 = localq.i();
        localz1.add(localObject4);
        localHashMap.put(localObject3, localObject4);
        localx.a(localObject4, localObject3);
        localz2.add(localObject3);
      }
      Object localObject4 = ((e_)localObject2).c;
      if (!bool) {
        if (localHashSet.add(localObject4))
        {
          localObject5 = localq.i();
          localz1.add(localObject5);
          localHashMap.put(localObject4, localObject5);
          localx.a(localObject5, localObject4);
          localz2.add(localObject4);
        }
      }
      localObject5 = (e)localHashMap.get(localObject3);
      localObject6 = (e)localHashMap.get(localObject4);
      localObject7 = localq.a((e)localObject5, (e)localObject6);
      localn.a(localObject7, 1);
      if (k == 0) {
        break;
      }
    }
    localObject1 = (e[])localz1.toArray(new e[localz1.size()]);
    Object localObject2 = a(localq, (e[])localObject1, localn);
    Object localObject3 = new HashMap();
    int i = 0;
    do
    {
      if (i >= localObject1.length) {
        break;
      }
      localObject5 = localObject1[i];
      ((Map)localObject3).put(localx.get(localObject5), new Integer(localObject2[i]));
      i++;
      if ((!bool) && (k != 0)) {
        break label414;
      }
    } while (k == 0);
    if (!bool) {
      localz2.a(new Comparator()
      {
        private final Map val$segmentToPosition;
        
        public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
        {
          f localf1 = (f)paramAnonymousObject1;
          f localf2 = (f)paramAnonymousObject2;
          int i = ((Integer)this.val$segmentToPosition.get(localf1)).intValue();
          int j = ((Integer)this.val$segmentToPosition.get(localf2)).intValue();
          return j - i;
        }
      });
    }
    label414:
    z localz3 = new z();
    Object localObject5 = localz2.iterator();
    label511:
    do
    {
      do
      {
        do
        {
          if (!((Iterator)localObject5).hasNext()) {
            break label516;
          }
          localObject6 = (f)((Iterator)localObject5).next();
          if (bool) {
            break label511;
          }
          if (((f)localObject6).l() == null) {
            break;
          }
          localObject7 = ((f)localObject6).l().b();
          localHashSet.addAll((Collection)localObject7);
          localz3.addAll((Collection)localObject7);
          if (bool) {
            break label513;
          }
        } while (k == 0);
        localz3.add(localObject6);
      } while (k == 0);
    } while (bool);
    label513:
    label516:
    int j = 0;
    Object localObject6 = paramList.iterator();
    if (((Iterator)localObject6).hasNext()) {}
    do
    {
      localObject7 = (f)((Iterator)localObject6).next();
      if (bool) {
        return;
      }
      if (k != 0) {
        break label612;
      }
      if (localHashSet.add(localObject7)) {
        localz3.add(j, localObject7);
      }
      j++;
      if (k == 0) {
        break;
      }
      paramList.clear();
    } while (bool);
    label612:
    paramList.addAll(localz3);
  }
  
  private g_[] a(i parami)
  {
    boolean bool = sb.e;
    int j = sb.d;
    List localList = parami.e();
    g_[] arrayOfg_ = new g_[localList.size()];
    HashMap localHashMap = new HashMap();
    int i = 0;
    Iterator localIterator = localList.iterator();
    if (localIterator.hasNext()) {}
    label156:
    while (bool)
    {
      f localf = (f)localIterator.next();
      a.c.d locald = localf.i();
      g_ localg_;
      if ((bool) || (localHashMap.containsKey(locald)))
      {
        localg_ = (g_)localHashMap.get(locald);
        localg_.a(localf);
        if (bool) {
          break label156;
        }
        if (j == 0) {}
      }
      else
      {
        localg_ = new g_(localf);
        localHashMap.put(locald, localg_);
      }
      arrayOfg_[i] = localg_;
      i++;
      if (j == 0) {
        break;
      }
    }
    return arrayOfg_;
  }
  
  private c_ a(f paramf)
  {
    n localn = this.b.a(paramf.i());
    f localf1 = localn.a(paramf);
    f localf2 = localn.b(paramf);
    return new c_(localf1, paramf, localf2);
  }
  
  private eb c(f paramf)
  {
    if (!sb.e) {}
    return paramf.g() ? new eb(paramf.a().b(), paramf.b().b()) : paramf.a() == null ? paramf.b() : new eb(paramf.b().a(), paramf.a().a());
  }
  
  private eb e(f paramf)
  {
    if (!sb.e) {}
    return paramf.g() ? new eb(paramf.b().a(), paramf.a().a()) : paramf.a() == null ? paramf.b() : new eb(paramf.a().b(), paramf.b().b());
  }
  
  private int a(eb parameb1, eb parameb2)
  {
    return (int)a(parameb1.c() - parameb2.c());
  }
  
  private static double a(double paramDouble)
  {
    boolean bool = sb.e;
    if (!bool) {
      if (Double.isNaN(paramDouble)) {
        return (0.0D / 0.0D);
      }
    }
    if (!bool)
    {
      if (paramDouble > 0.0D) {
        return 1.0D;
      }
      if (bool) {}
    }
    else if (paramDouble < 0.0D)
    {
      return -1.0D;
    }
    return paramDouble;
  }
  
  private void a(b_ paramb_)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    q localq = new q();
    int i = paramb_.a();
    e[] arrayOfe = new e[i];
    int j = 0;
    do
    {
      while (i1 == 0)
      {
        if (j >= i) {
          break;
        }
        arrayOfe[j] = localq.i();
        j++;
      }
    } while (bool);
    a.c.n localn = localq.C();
    int k = 1;
    label180:
    do
    {
      if (k >= i) {
        break;
      }
      int m = 0;
      do
      {
        do
        {
          if (m >= k) {
            break label180;
          }
          int n = paramb_.a(k, m);
          if (i1 != 0) {
            break;
          }
          if (n > 0)
          {
            localn.a(localq.a(arrayOfe[k], arrayOfe[m]), n);
            if (bool) {
              continue;
            }
            if (i1 == 0) {}
          }
          else
          {
            if (bool) {
              continue;
            }
            if (n < 0) {
              localn.a(localq.a(arrayOfe[m], arrayOfe[k]), -n);
            }
          }
          m++;
        } while (i1 == 0);
        k++;
      } while (bool);
    } while (i1 == 0);
    int[] arrayOfInt = a(localq, arrayOfe, localn);
    this.f = new int[this.e.a().l()];
    this.g = new int[this.e.a().l()];
    System.arraycopy(arrayOfInt, 0, this.f, 0, this.f.length);
    System.arraycopy(arrayOfInt, this.f.length, this.g, 0, this.g.length);
  }
  
  private int[] a(q paramq, e[] paramArrayOfe, a.c.n paramn)
  {
    boolean bool = sb.e;
    int i2 = sb.d;
    a(paramq, paramn);
    a.i.a.d locald = new a.i.a.d(paramq);
    int i = 1;
    int[] arrayOfInt1 = new int[paramq.j()];
    int[] arrayOfInt2 = new int[paramq.j()];
    int j = paramq.j() / 2;
    int k = 0;
    e locale1;
    do
    {
      if (k >= paramArrayOfe.length) {
        break;
      }
      locale1 = paramArrayOfe[k];
      if (i2 != 0) {
        break label212;
      }
      if (locale1.d() == 0)
      {
        if (!bool) {}
        int n = k < j ? k + j : k - j;
        if (!bool)
        {
          if (arrayOfInt2[n] != 0)
          {
            arrayOfInt2[k] = (-arrayOfInt2[n]);
            locald.a(locale1, arrayOfInt2[k]);
            if (bool) {
              continue;
            }
            if (i2 == 0) {}
          }
          else
          {
            arrayOfInt2[k] = i;
            locald.a(locale1, i++);
          }
        }
        else
        {
          if (bool) {
            continue;
          }
          if (i2 == 0) {}
        }
      }
      else
      {
        arrayOfInt1[k] = locale1.d();
      }
      k++;
    } while (i2 == 0);
    if (!bool) {
      label212:
      k = 1;
    }
    label343:
    do
    {
      e locale2;
      int i1;
      do
      {
        do
        {
          if (locald.a()) {
            break;
          }
          locale1 = locald.c();
          arrayOfInt2[locale1.f()] = (k++);
          locald1 = locale1.h();
        } while (locald1 == null);
        locale2 = locald1.f();
        i1 = arrayOfInt1[locale2.f()];
        arrayOfInt1[locale2.f()] -= 1;
        if (bool) {
          break label439;
        }
      } while (i2 != 0);
      if ((!bool) && (i2 != 0)) {
        break label439;
      }
      if (!bool)
      {
        if (i1 != 1) {
          break label426;
        }
        if (bool) {
          break label343;
        }
      }
      e locale3 = locale2.f() < j ? paramArrayOfe[(locale2.f() + j)] : paramArrayOfe[(locale2.f() - j)];
      if (!bool) {
        if (arrayOfInt2[locale3.f()] != 0)
        {
          locald.a(locale2, -arrayOfInt2[locale3.f()]);
          if (bool) {
            continue;
          }
          if (i2 == 0) {
            break label426;
          }
        }
      }
      arrayOfInt2[locale2.f()] = i;
      locald.a(locale2, i++);
      a.c.d locald1 = locald1.i();
    } while (i2 == 0);
    label426:
    label439:
    int m = 0;
    do
    {
      while (i2 == 0)
      {
        if (m >= arrayOfInt2.length) {
          break;
        }
        if ((!bool) && (i2 != 0)) {
          break label485;
        }
        arrayOfInt2[m] = (-arrayOfInt2[m]);
        m++;
      }
    } while (bool);
    label485:
    return arrayOfInt2;
  }
  
  void a(q paramq, k paramk)
  {
    boolean bool = sb.e;
    int i4 = sb.d;
    if (l.a(paramq)) {
      return;
    }
    a.c.n localn = db.b();
    Object localObject1 = paramq.w();
    do
    {
      if (!((a.c.m)localObject1).e()) {
        break;
      }
      a.c.d locald1 = ((a.c.m)localObject1).a();
      localn.a(locald1, paramk.getInt(locald1));
      ((a.c.m)localObject1).f();
    } while (i4 == 0);
    localObject1 = paramq.t();
    int i = paramq.j() / 2;
    z localz = new z();
    Object localObject2;
    label195:
    label207:
    do
    {
      break label207;
      ab localab;
      if ((localab = a.a.f.a(paramq, true)).isEmpty()) {
        break;
      }
      int j;
      a.c.d locald2;
      int m;
      int n;
      do
      {
        if (localab.size() == 1) {
          throw new IllegalStateException("Selfloop in Order Graph!");
        }
        j = 2147483647;
        localObject2 = localab.l();
        do
        {
          do
          {
            if (!((a.c.m)localObject2).e()) {
              break label195;
            }
            int k = localn.getInt(((a.c.m)localObject2).a());
            if (i4 != 0) {
              break;
            }
            if (k < j) {
              j = k;
            }
            ((a.c.m)localObject2).f();
          } while (i4 == 0);
        } while (bool);
        localObject2 = localab.l();
        if (!((a.c.m)localObject2).e()) {
          break;
        }
        if (bool) {
          break label436;
        }
        locald2 = ((a.c.m)localObject2).a();
        m = locald2.e().f();
        n = locald2.f().f();
        if ((bool) || (i4 != 0)) {
          break label431;
        }
      } while (i4 != 0);
      int i1 = m >= i ? m - i : m + i;
      if (!bool) {}
      int i2 = n >= i ? n - i : n + i;
      a.c.d locald3 = localObject1[i1].b(localObject1[i2]);
      int i3 = localn.getInt(locald2) - j;
      localn.a(locald2, i3);
      localn.a(locald3, i3);
      if (!bool)
      {
        if (i3 == 0)
        {
          f_ localf_ = new f_(paramq, locald2, locald3, null);
          localf_.c();
          localz.add(localf_);
        }
        ((a.c.m)localObject2).f();
      }
    } while (i4 == 0);
    if (!bool) {
      localz.a(new d_(paramk));
    }
    label431:
    label436:
    y localy = localz.h();
    do
    {
      if (!localy.e()) {
        break;
      }
      localObject2 = (f_)localy.j();
      ((f_)localObject2).a();
      if (!bool)
      {
        if (!l.a(paramq)) {
          ((f_)localObject2).c();
        }
        localy.f();
      }
    } while (i4 == 0);
  }
  
  public static final class g_
  {
    private static final byte a = 0;
    private static final byte b = 1;
    private static final byte c = 2;
    private List e = new z();
    private byte f;
    private f h;
    public static boolean i;
    
    public g_(f paramf)
    {
      this.e.add(paramf);
      this.f = 0;
      this.h = paramf;
    }
    
    public void a(f paramf)
    {
      boolean bool = sb.e;
      if (!bool) {
        if (this.h.h() == paramf.h())
        {
          this.f = 1;
          if (bool) {
            break label46;
          }
          if (sb.d == 0) {
            break label42;
          }
        }
      }
      this.f = 2;
      label42:
      label46:
      if (!bool) {
        if (paramf.j() < this.h.j()) {
          this.h = paramf;
        }
      }
      this.e.add(paramf);
    }
  }
  
  private final class e_
  {
    final f a;
    final f c;
    
    public e_(f paramf1, f paramf2)
    {
      this.a = paramf1;
      this.c = paramf2;
    }
    
    public boolean equals(Object paramObject)
    {
      boolean bool = sb.e;
      if (!bool) {
        if (this == paramObject) {
          return true;
        }
      }
      if (paramObject != null)
      {
        if (bool) {
          break label37;
        }
        if (getClass() == paramObject.getClass()) {}
      }
      else
      {
        return false;
      }
      label37:
      e_ locale_ = (e_)paramObject;
      if ((bool) || (this.a.equals(locale_.a))) {
        if (bool) {}
      }
      return this.c.equals(locale_.c);
    }
    
    public int hashCode()
    {
      int i = this.a.hashCode();
      i = 31 * i + this.c.hashCode();
      return i;
    }
  }
  
  private static class c_
  {
    private static final int a = 1;
    private static final int c = -1;
    private int e;
    private int f;
    
    c_(int paramInt1, int paramInt2)
    {
      this.e = paramInt1;
      this.f = paramInt2;
    }
    
    c_(f paramf1, f paramf2, f paramf3)
    {
      int i = a(paramf2);
      int j = 1;
      int k = a(i, j);
      int m = b(a(k, paramf1, paramf3));
      this.f = (k * m);
      j = -1;
      k = a(i, j);
      m = b(a(k, paramf1, paramf3));
      this.e = (k * m);
    }
    
    private int a(f paramf)
    {
      tb localtb = paramf.h();
      if ((sb.e) || ((tb.b == localtb) || (tb.a == localtb))) {
        return 1;
      }
      return -1;
    }
    
    private f a(int paramInt, f paramf1, f paramf2)
    {
      return paramInt > 0 ? paramf2 : paramf1;
    }
    
    private int a(int paramInt1, int paramInt2)
    {
      return paramInt1 * paramInt2;
    }
    
    private int b(f paramf)
    {
      boolean bool = sb.e;
      if (!bool) {
        if (paramf == null) {
          return 0;
        }
      }
      tb localtb = paramf.h();
      if ((bool) || ((tb.d == localtb) || (tb.a == localtb))) {
        return -1;
      }
      return 1;
    }
    
    public int a()
    {
      return this.e;
    }
    
    public int b()
    {
      return this.f;
    }
  }
  
  private static class b_
  {
    private final int a;
    private final byte[] b;
    
    b_(q paramq)
    {
      this.a = (2 * paramq.m());
      this.b = new byte[this.a * (this.a - 1) / 2];
    }
    
    int a()
    {
      return this.a;
    }
    
    void a(f paramf1, f paramf2, int paramInt)
    {
      boolean bool = sb.e;
      int i = (bool) || ((tb.a == paramf1.h()) || (tb.b == paramf1.h())) ? 1 : 0;
      int j = (bool) || ((tb.a == paramf2.h()) || (tb.b == paramf2.h())) ? 1 : 0;
      if (!bool) {}
      int k = paramf1.i().d() + (i != 0 ? 0 : this.a / 2);
      if (!bool) {}
      int m = paramf2.i().d() + (j != 0 ? 0 : this.a / 2);
      a(k, m, paramInt);
      if (!bool) {}
      int n = paramf1.i().d() + (i != 0 ? this.a / 2 : 0);
      if (!bool) {}
      int i1 = paramf2.i().d() + (j != 0 ? this.a / 2 : 0);
      a(n, i1, -paramInt);
    }
    
    void a(int paramInt1, int paramInt2, int paramInt3)
    {
      boolean bool = sb.e;
      if (!bool) {
        if (paramInt1 < paramInt2)
        {
          i = paramInt2;
          paramInt2 = paramInt1;
          paramInt1 = i;
          paramInt3 = -paramInt3;
        }
      }
      int i = paramInt1 * (paramInt1 - 1) / 2 + paramInt2;
      int j = this.b[i];
      if (!bool)
      {
        if (paramInt3 > 0)
        {
          if (bool) {
            break label99;
          }
          this.b[i] = ((byte)Math.min(j + paramInt3, 127));
        }
      }
      else if (sb.d == 0) {
        return;
      }
      label99:
      this.b[i] = ((byte)Math.max(j + paramInt3, -128));
    }
    
    byte a(int paramInt1, int paramInt2)
    {
      boolean bool = sb.e;
      if (!bool)
      {
        if (paramInt1 < paramInt2) {
          return (byte)-this.b[(paramInt2 * (paramInt2 - 1) / 2 + paramInt1)];
        }
        if (bool) {}
      }
      else if (paramInt1 > paramInt2)
      {
        return this.b[(paramInt1 * (paramInt1 - 1) / 2 + paramInt2)];
      }
      return 0;
    }
    
    public String toString()
    {
      boolean bool = sb.e;
      int m = sb.d;
      StringBuffer localStringBuffer = new StringBuffer();
      localStringBuffer.append("Edge Order Matrix:\n");
      int i = 0;
      if (i < this.a) {
        if (!bool) {
          if (i == this.a / 2)
          {
            j = 0;
            if (j < this.a) {}
            while (bool)
            {
              localStringBuffer.append("----");
              j++;
              if (bool) {
                break label98;
              }
              if (m != 0) {
                break label97;
              }
              if (m == 0) {
                break;
              }
            }
            localStringBuffer.append("\n");
          }
        }
      }
      label97:
      label98:
      while (bool)
      {
        int j = 0;
        do
        {
          do
          {
            if (j >= this.a) {
              break label217;
            }
            if (m != 0) {
              break;
            }
            if (j == this.a / 2) {
              localStringBuffer.append("| ");
            }
            int k = a(j, i);
            if (!bool)
            {
              if (k >= 0) {
                localStringBuffer.append("+");
              }
            }
            else
            {
              if (bool) {
                break label176;
              }
              if (m == 0) {
                break label171;
              }
            }
            localStringBuffer.append("-");
            if (!bool)
            {
              if (Math.abs(k) < 10) {
                localStringBuffer.append(0);
              }
              localStringBuffer.append(Math.abs(k));
              localStringBuffer.append(" ");
              j++;
            }
          } while (m == 0);
          localStringBuffer.append("\n");
          i++;
        } while (bool);
        if (m == 0) {
          break;
        }
      }
      label171:
      label176:
      label217:
      return localStringBuffer.toString();
    }
  }
  
  private static class f_
  {
    private final a.c.d a;
    private final a.c.d b;
    private final q d;
    
    private f_(q paramq, a.c.d paramd1, a.c.d paramd2)
    {
      this.a = paramd1;
      this.b = paramd2;
      this.d = paramq;
    }
    
    void a()
    {
      boolean bool = sb.e;
      this.d.d(this.a);
      if (((bool) || (this.b != null)) && ((bool) || (!this.d.j(this.b)))) {
        this.d.d(this.b);
      }
    }
    
    void c()
    {
      boolean bool = sb.e;
      this.d.a(this.a);
      if (((bool) || (this.b != null)) && ((bool) || (this.d.j(this.b)))) {
        this.d.a(this.b);
      }
    }
    
    f_(q paramq, a.c.d paramd1, a.c.d paramd2, rc.0 param0)
    {
      this(paramq, paramd1, paramd2);
    }
  }
  
  static final class d_
    implements Comparator
  {
    private k a;
    
    d_(k paramk)
    {
      this.a = paramk;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      rc.f_ localf_1 = (rc.f_)paramObject1;
      rc.f_ localf_2 = (rc.f_)paramObject2;
      int i = this.a.getInt(localf_1.a);
      int j = this.a.getInt(localf_2.a);
      return j - i;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.a.rc

 * JD-Core Version:    0.7.0.1

 */